
% takes input from selectVesselCenters to get pixel positions of each line
function r = interpolateLineSegs(linesegArray,imsz)


numlines = length(linesegArray);
r = zeros(imsz);

for n = 1:numlines
    curline = round(linesegArray{n});
    numseg = size(curline,1);
    for k = 2:numseg
        [cx,cy,~] = improfile(r,[curline(k-1,1),curline(k,1)],[curline(k-1,2),curline(k,2)]);
        cx = round(cx);cy = round(cy);
        ind = sub2ind(imsz,cy,cx);
        r(ind) = n;
    end
end

    
